package net.homeip.jcperera.webinfo;

import java.io.Serializable;

import javax.inject.Named;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import net.homeip.jcperera.nu.model.entity.PersistentEntity;

@Entity
@Table(name = ScanProfileParameter.tableName)
@Named(ScanProfileParameter.componentName)
@Inheritance(strategy = InheritanceType.JOINED)
public class ScanProfileParameter extends PersistentEntity implements Serializable
{
    private static final long  serialVersionUID = 72923822854939703L;

    // CoreBase properties, for easy use from other components, as well as logging
    public static final int    runtimeLevel     = 5;
    public static final String moduleName       = "webinfo";
    public static final String componentName    = "webinfo_scanprofileparameter";

    // All persistent entities should specify a table name
    public static final String tableName        = "SCAN_PROFILE_PARAMETER";

    @Basic
    @Column(name = "CODE")
    private String             code             = "";

    @Basic
    @Column(name = "NAME")
    private String             name             = "";

    @Basic
    @Column(name = "FIXEDVALUE")
    private String             fixedValue       = "";

    @Basic
    @Column(name = "CURRENTVALUE")
    private String             currentValue     = "";
    
    @ManyToOne
    @JoinColumn(name = "SCANPROFILE", nullable = false)
    private ScanProfile        scanProfile;

    public String getCode()
    {
        return code;
    }

    public void setCode(String code)
    {
        this.code = code;
    }

    public String getName()
    {
        return name;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    public String getFixedValue()
    {
        return fixedValue;
    }

    public void setFixedValue(String fixedValue)
    {
        this.fixedValue = fixedValue;
    }

    public String getCurrentValue()
    {
        return currentValue;
    }

    public void setCurrentValue(String currentValue)
    {
        this.currentValue = currentValue;
    }

    public ScanProfile getScanProfile()
    {
        return scanProfile;
    }

    public void setScanProfile(ScanProfile scanProfile)
    {
        this.scanProfile = scanProfile;
    }
}
